package io;

import org.junit.Test;

import java.io.*;

/**
 * DataInputStream - 装饰器基类demo
 *
 * @Author: zhenzhong.wang@honeywell.com
 * @Date: 2019/4/13 10:06 AM
 */
public class DataInputStreamDemo {

  @Test
  public void test1() throws IOException {
    DataInputStream dataInputStream = new DataInputStream(new FileInputStream(
        new File("/Users/zhenzhong/WorkspaceCore/java-test/src/main/java/io/CompletableFutureDemo.java")));
    char c;
    while (true) {
//      System.out.print(new String(new byte[]{dataInputStream.readByte()}, "utf-8"));
      System.out.print(dataInputStream.readChar());
    }
  }

  @Test
  public void test2() {
  }
}
